Spread WPF Documentation
SavePdf(Stream,PdfExportSettings,Int32[]) Method
Example 


GrapeCity.Windows.SpreadSheet.Data Namespace > Workbook Class > SavePdf Method : SavePdf(Stream,PdfExportSettings,Int32[]) Method
The stream to which to save the data.
The export settings.
The index of the sheet.
Saves the content of the GcSpreadSheet component to the specified stream.
Syntax
'Declaration
 
Public Overloads Sub SavePdf( _
   ByVal stream As System.IO.Stream, _
   ByVal settings As PdfExportSettings, _
   ByVal ParamArray sheetIndexs() As System.Integer _
) 
'Usage
 
Dim instance As Workbook
Dim stream As System.IO.Stream
Dim settings As PdfExportSettings
Dim sheetIndexs() As System.Integer
 
instance.SavePdf(stream, settings, sheetIndexs)
public void SavePdf( 
   System.IO.Stream stream,
   PdfExportSettings settings,
   params System.int[] sheetIndexs
)

Parameters

stream
The stream to which to save the data.
settings
The export settings.
sheetIndexs
The index of the sheet.
Example
This example prints to a PDF file.
string fileName;
fileName = "c:\\zipfile\\test.pdf";
System.IO.Stream stream;
stream = System.IO.File.Create(fileName);

GrapeCity.Windows.SpreadSheet.Data.PdfExportSettings test;
test = new GrapeCity.Windows.SpreadSheet.Data.PdfExportSettings();
test.Title = "Print PDF";
test.Author = "GrapeCity, Inc.";
test.DisplayDocTitle = true;
test.FitWindow = true;
gcSpreadSheet1.SavePDF(stream, 0);
//gcSpreadSheet1.SavePDF(stream, test, 0);
Dim fileName As String
fileName = "c:\zipfile\test.pdf"
Dim stream As System.IO.Stream
stream = System.IO.File.Create(fileName)

Dim test As New GrapeCity.Windows.SpreadSheet.Data.PdfExportSettings()
test.Title = "Print PDF"
test.Author = "GrapeCity, Inc."
test.DisplayDocTitle = True
test.FitWindow = True
GcSpreadSheet1.SavePDF(stream, 0)
'GcSpreadSheet1.SavePDF(stream, test, 0)
See Also

Reference

Workbook Class
Workbook Members
Overload List